import {Card, Row, Col, Typography} from "antd";
import Base from "@/pages/Province/SubjectDetail/components/Base";
import Gmm04_1 from "./components/wx_components/Gmm04_1";
import Gmm04_2 from "./components/wx_components/Gmm04_2";
import Gmm04_3 from "./components/wx_components/Gmm04_3";
import Gmm04_4 from "./components/wx_components/Gmm04_4";
import Gmm04_5 from "./components/wx_components/Gmm04_5";
import Gmm04_6 from "./components/wx_components/Gmm04_6";
import Gmm04_7 from "./components/wx_components/Gmm04_7";
import Gmm04_8 from "./components/wx_components/Gmm04_8";
import Gmm04_9 from "./components/wx_components/Gmm04_9";
import {history} from "@@/core/history";
import {useEffect, useState} from "react";
import {Detail04Number} from "@/services/Province/Dashboard";

export default (props) => {

  const urlArr = history.location.pathname.split('/')
  const school = urlArr[urlArr.length - 1]
  const subject = urlArr[urlArr.length - 2]
  const schoolSubject = school + '-' + subject
  const [numbers, setnumbers] = useState([0, 0, 0])
  const [reload, setreload] = useState(false)
  useEffect(() => {
    Detail04Number({subject: schoolSubject}).then(res => {
      if (res.status === 0) {
        // setnumbers(res.data)
        setnumbers(res.data)
      }
    })
  }, [reload])

  return <Base props={props}>
    <Row gutter={[24, 24]}>
      <Col span={24}><Card title="科研平台建设">
        <Row>
          <Col>
            <Gmm04_3/>
          </Col>
        </Row>
        <Card>
          <p className="good-content-size">自2021年1月1日至今，本学科主办学术期刊共计<Typography.Text strong>{numbers[2]}本</Typography.Text></p>
        </Card>
      </Card></Col>
      <Col span={24}><Card title="科研项目">
        <Row>
          <Col>
            <Gmm04_4/>
          </Col>
        </Row>
      </Card></Col>
    </Row>
  </Base>
}
